package cn.fx.framework.cons;

import cn.fx.framework.core.CodeMessage;

/**
 * @author ljh
 * @date 2020/4/21 10:36
 */
public interface GlobalCodeMessage {
    CodeMessage BAD_REQUEST_EXCEPTION_MSG = new CodeMessage(400, "错误的请求");
    CodeMessage INVOKE_TIMEOUT_EXCEPTION_MSG = new CodeMessage(408, "调用超时");
    CodeMessage REMOTE_INVOKE_EXCEPTION_MSG = new CodeMessage(499, "接口调用失败");
    CodeMessage METHOD_INVOKE_EXCEPTION_MSG = new CodeMessage(498, "方法调用失败");
    CodeMessage REPEAT_REQUEST_MSG = new CodeMessage(497, "重复请求");
    CodeMessage REQUEST_SIGN_ERROR_MSG = new CodeMessage(496, "签名错误");
    /**对应500异常码*/
    CodeMessage SERVER_ERROR_MSG = new CodeMessage(500, "服务器发生错误了");
    CodeMessage INVALID_REQUEST_PARAMETER_EXCEPTION_MSG = new CodeMessage(469, "请求参数非法");
    CodeMessage COLLECTION_NULL_OR_EMPTY_EXCEPTION_MSG = new CodeMessage(468, "集合NULL或为空");
    CodeMessage SERVICE_EXCEPTION_MSG = new CodeMessage(444, "业务逻辑异常");
    CodeMessage SERVICE_CHECK_EXCEPTION_MSG = new CodeMessage(408, "业务逻辑校验异常");
    CodeMessage PERMISSION_EXCEPTION_MSG = new CodeMessage(489, "权限检验异常");
    CodeMessage DATATYPE_CONVERT_EXCEPTION = new CodeMessage(487, "数据类型转换异常");
    CodeMessage DATABASE_TABLE_UNIQUE_EXCEPTION = new CodeMessage(486, "违反数据库唯一键约束异常");
    CodeMessage ENTITY_NOT_FOUND_EXCEPTION = new CodeMessage(485, "实体未查到");
    CodeMessage AUTHORIZATION_EXCEPTION_MSG = new CodeMessage(401, "授权异常");
    CodeMessage INVALID_ARGS_EXCEPTION = new CodeMessage(495, "无效的参数");
    CodeMessage BASE_EXCEPTION_MSG = new CodeMessage(999, "自定义通用异常");
}
